<script type="text/template" id="department-template">
    <div style="background-color: #F1F5F8;height: 100%;width: 100%;float:left;">
        <div class="department-body">
            <div class="department-rightBody">
                <div class="search-header"><input id="departmentSearch" type="text" placeholder="搜索"/></div>
                <div class="treeBody">
                    <ul id="tree" class="ztree" style="width:200px;"></ul>
                </div>
            </div>
            <div class="department-leftBody">
                <div class="activeDepartment-header">
                    <span style="font-size: 20px; display: inline-block;">-</span>
                    <button class="btn btn-yellow" id="editDepartment">部门编辑</button>
                    <button class="btn btn-red" id="deleteDepartment" style="display: inline-block;width: 40px; margin-left: 6px;"><i class="fa fa-trash-o"></i></button>
                </div>
                <div class="activeDepartment-link">
                    <div class="activeLink"><span class="back">江苏华通晟云科技有限公司</span><span>&gt;</span></div>
                    <div class="activeLink"><span class="back">生产部</span><span>&gt;</span></div>
                    <div class="activeLink"><span>喷涂车间</span></div>
                </div>
                <div class="child-department">
                    <div class="child-department-header no-select">
                        <div class="cIcon"></div>
                        <div>下级部门</div>
                        <button id="addDepartment" class="btn btn-default" style="color: #777; margin-top: 8px;margin-left: 5px;"><i class="fa fa-plus" aria-hidden="true"></i></button>
                        <button id="saveDepartment" class="btn btn-default " style="">保存</button>
                    </div>
                    <div class="child-department-body">
                        <div class="insertLine"></div>
                        <div class="childDepartment-block">-</div>
                    </div>
                </div>
                <div class="child-department-member no-select">
                    <div class="child-department-header no-select">
                        <div class="bIcon"></div>
                        <div>部门成员</div>
                    </div>
                    <div class="department-memberTable">

                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
<script type="text/template" id="employee-info-template">
    <div class="inputForm-row employee-info" style="margin-top: 15px; display: inline-block;">
        <label for="name">姓名:</label>
        <input id="realName" value="<@=userInfo.realName@>" type="text">
    </div>
    <div class="inputForm-row employee-info" >
        <label for="name">手机:</label>
        <input id="tel" value="<@=userInfo.tel@>" type="text">
    </div>
    <div class="inputForm-row employee-info" >
        <label for="name" style="float: left; height: 38px; line-height: 38px;">部门:</label>
        <select  id="belongDepart" >
            <@$.each(department,function(i,n){@>
            <@if(n.id == userInfo.depId){@>
            <option selected="selected" value="<@=n.id@>"><@=n.name@></option>
            <@}else{@>
            <option value="<@=n.id@>"><@=n.name@></option>
            <@}@>
            <@})@>
        </select>
    </div>
    <div class="inputForm-row employee-info" >
        <label for="name">职位:</label>
        <input id="position" value="<@=userInfo.position@>" type="text">
    </div>
</script>
<script type="text/template" id="department-info-template">
    <div class="inputForm-row department-info" style="margin-top: 15px; display: inline-block;">
        <label for="name" style="width: 100%">部门名称:</label>
        <input id="name" value="<@=type=='update'?node.name:''@>" type="text">
    </div>
    <div class="inputForm-row department-info" >
        <label for="name">所属部门:</label>
            <@if(type == "create"){@>
                <select name="" id="belongDepart" disabled="disabled">
                    <@$.each(department,function(i,n){@>
                    <@if(n.id==node.id){@>
                    <option value="<@=n.id@>" selected="selected"><@=n.name@></option>
                    <@}@>
                    <@})@>
                </select>
            <@}else if(type == "update"){@>
                <select name="" id="belongDepart" >
                    <@$.each(department,function(i,n){@>
                    <option value="<@=n.id@>"  <@=n.id==node.pId?"selected='selected'":""@>><@=n.name@></option>
                    <@})@>
                </select>
            <@}@>
    </div>
    <div class="inputForm-row department-info" >
        <label for="leader" style="width: 100%">部门领导:</label>
        <select id="leader">
            <option value=" ">-</option>
        </select>
    </div>
</script>